#include "heart.h"
#include "led01.h"
#include "FreeRTOS.h"
#include "task.h"

TaskHandle_t heart_task_handler;
int heartstate=1; 

void heartTaskInit(){
  led_init();
}

void HeartTask(void * param){
  while(1){
    if(heartstate){
      led1 = !led1;
		
    }else{
      led1 = 1;
    }
    vTaskDelay(2000);
  }
}

void createHeartTask(){
  xTaskCreate(HeartTask,"HeartTask",128,NULL,2,&heart_task_handler);
}